package com.showsu.editor.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: William
 * @Description: 是否备用的枚举
 * @Date: Created in 11:33 上午 2023/12/27
 * @Modified By:
 */
@Getter
@AllArgsConstructor
public enum StandbyEnum {

    NO(0),
    STANDBY1(1),
    STANDBY2(2),
    ;

    final int code;

    public static StandbyEnum getByCode(Integer code) {
        if (code != null) {
            for (StandbyEnum platformEnum : StandbyEnum.values()) {
                if (code.equals(platformEnum.getCode())) {
                    return platformEnum;
                }
            }
        }
        return NO;
    }

}
